﻿using Fuse8.ContentManagementFramework.Domain.Bases;
using Fuse8.DomainFramework.Domain;
using System;

namespace Fuse8.ContentManagementFramework.Domain.Commands.CommandParameters
{
    public class CmsCreateUpdateUserCommandParameter : IEntityCommandParameter, ISiteAwareEntityObject, ITrackingEntityObject
    {
        public string LoginName { get; set; }

        public string UserEmail { get; set; }

        public string PasswordHash { get; set; }

        public string PasswordSalt { get; set; }

        public bool IsSystem { get; set; }

        public bool IsEnabled { get; set; }

        public string Lastname { get; set; }

        public string Firstname { get; set; }

        public bool IsInitial { get; set; }

        public string Locale { get; set; }

        #region ISiteAwareEntityObject Members

        public int Id { get; set; }

        public int? SiteGroupId { get; set; }

        public int? SiteId { get; set; }

        public SiteAwareCategory SiteCategory
        {
            get
            {
                return this.GetCategory();
            }
        }

        #endregion ISiteAwareEntityObject Members

        #region ITrackingEntityObject Members

        public bool IsNew
        {
            get
            {
                return Id == 0;
            }
        }

        public int CreatedBy { get; set; }

        public DateTime DateCreated { get; set; }

        public int? LastUpdatedBy { get; set; }

        public DateTime? DateLastUpdated { get; set; }

        #endregion ITrackingEntityObject Members
    }
}